package com.financing.wap.dao.impl;

import java.util.List;
import com.financing.wap.dao.impl.BaseDaoImpl;
import com.financing.wap.dao.IFpFundCompanyDao;
import com.financing.wap.dto.FpFundCMDTO;
import com.financing.wap.dto.FpFundCompanyDTO;
import com.financing.wap.util.SqlName;
import java.sql.SQLException;
import java.util.Collections;

import org.springframework.stereotype.Repository;

/**
 * @Description:实现类
 * @author caojiayao
 * @version 1.0
 * @created 
 */
@Repository("fpFundCompany")
public class FpFundCompanyDaoImpl extends BaseDaoImpl implements IFpFundCompanyDao {
	
	@Override
	public FpFundCompanyDTO getFpFundCompany(Integer id) {
		return (FpFundCompanyDTO)this.getSqlMapClientTemplate().queryForObject(SqlName.fpFundCompany,id);
	}
	
	
	@Override
	public Integer insertFpFundCompany(FpFundCompanyDTO dto) {
		return (Integer) this.getSqlMapClientTemplate().insert(SqlName.insertFpFundCompany,dto);
	}

	
	@Override
	public Integer updateFpFundCompany(FpFundCompanyDTO dto) {
		return (Integer) this.getSqlMapClientTemplate().update(SqlName.updateFpFundCompany, dto);
	}
	
	@Override
	public Integer delFpFundCompany(Integer id) {
		return (Integer) this.getSqlMapClientTemplate().delete(SqlName.delFpFundCompany, id);
	}
	
	@Override
	public List<FpFundCompanyDTO> listFpFundCompany(FpFundCompanyDTO dto) {
		return (List<FpFundCompanyDTO>)this.getSqlMapClientTemplate().queryForList(SqlName.listFpFundCompany, dto);
	}
	
	
	public Integer countFpFundCompany(FpFundCompanyDTO dto){
		return (Integer)this.getSqlMapClientTemplate().queryForObject(SqlName.countFpFundCompany, dto);
	}


	public List<FpFundCompanyDTO> getFpFundCompanyByManagerId(String managerId) {
		return (List<FpFundCompanyDTO>)this.getSqlMapClientTemplate().queryForList(SqlName.getFpFundCompanyByManagerId,managerId);
	}


	public List<FpFundCompanyDTO> listFpFundCompanyByManagerId(String managerId) {
		return (List<FpFundCompanyDTO>)this.getSqlMapClientTemplate().queryForList(SqlName.listFpFundCompanyByManagerId, managerId);
	}


	public List<FpFundCompanyDTO> getFpFundCompanyByFundId(String managerId) {
		return (List<FpFundCompanyDTO>)this.getSqlMapClientTemplate().queryForList(SqlName.getFpFundCompanyByFundId,managerId);
	}
	
	@Override
	public Class<FpFundCompanyDTO> getEntityClass() {
		return FpFundCompanyDTO.class;
	}
}
